package com.example.demo.qr;

import cn.hutool.core.util.ImageUtil;
import com.example.demo.BaseTest;
import org.junit.Test;

import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;

/**
 * @author luojm
 * @describe
 * @datetime 2018/8/3 16:05
 */
public class SetMyImage extends BaseTest {
    @Test
    public void cutting(){
        //读取
        BufferedImage image = ImageUtil.read(new File("C:/Users/luojm/Desktop/test.png"));
        //裁剪
        Image scale = ImageUtil.scale(image, 25, 25);
        //输出
        ImageUtil.write(scale, new File("C:/Users/luojm/Desktop/emoj.png"));
    }


}
